<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .da{
            width: 1300px;
            margin: auto;
        }
        img{
            width: 200px;
            height: 200px;
        }
        li{
            width: 200px;
            height: 300px;
            list-style: none;
            margin-top: 15px;
            float: left;
            margin-left: 20px;
        }
        .z{
            font-size: 13px;
        }
        .jg{
            margin-top: 15px;
            color: red;
        }
        .button{
            width: 100px;
            height: 50px;
            text-decoration: none;
        }
        .tj{
            width: 300px;
            height: 100px;
            background-image: linear-gradient(to top left,skyblue,yellow);
            background-color: aquamarine;
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
            display: none;
        }
    </style>
</head>
<body>
    <div class="da">
        <button class=".botton" onclick="f()">添加商品</button>
        <div class="tj">
            介绍：<input type="text" class="js"><br>
            图片：<input type="radio" class="tp" value="../古月方源.jpeg">仙尊<br>
            价格：<input type="text" class="jg"><br>
            &emsp13;&emsp13;&emsp13;&emsp13;&emsp13;&emsp13;<button onclick="qd()">确定</button>&emsp13;&emsp13;&emsp13;<button onclick="qx()">取消</button>
        </div>
        <ul>
            <li>
                <img src="../古月方源.jpeg">
                <p class="z">古月方源古月方源古月方源古月方源古月方源古月方源古月方源</p>
                <p class="jg">￥13000.00</p>
            </li>
        </ul>
    </div>
</body>
</html>
<script>
    var div=document.querySelector(".tj")
    var js=document.querySelector(".js")
    var jg=document.querySelector(".jg")
    var tp=document.querySelector(".tp")
    var ul=document.querySelector("ul")
    function f(){
        div.style.display='block'
    }
    function qx(){
        div.style.display='none'
    }
    function qd(){
        var li=document.createElement('li')
        li.innerHTML=`
                <img src="${tp.value}">
                <p class="z">${js.value}</p>
                <p class="jg">￥${jg.value}.00</p>
        `;
        ul.append(li)
        
        js.value=''
        jg.value=''
    }
</script>